var r = require.context("./pages",false,/.vue/);

var arr = [];

r.keys().forEach(key => {
    var keyarr = key.split(".");
    console.log(keyarr);
    
    if (key.indexOf("index")!==-1) {
        arr.push({
            path:keyarr[1],
            component:r(key).default
        })
    }else{
        arr.push({
            path:keyarr[1]+"/"+keyarr[2],
            component:r(key).default
        })
    }
});

export default arr;